FROM python:3.10.12

MAINTAINER chenxiaoliang

ADD . /code

WORKDIR /code

# 将配置文件挂载点设置为 /app/config
# docker run启动容器时需要指定-v命令行参数
# docker run -d --name monitor -e "EMAIL_PW=xxxxxxxx" -e "TZ=Asia/Shanghai" -v /root/monitor/config_monitor.yaml:/code/config_monitor.yaml monitor_app:v0.0.3
VOLUME /code/config_monitor.yaml

RUN pip --no-cache-dir install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ && pip --no-cache-dir install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

CMD ["python", "/code/monitor_app.py"]
